export const tableOption = {
  data() {
    return {
      //桌面端表单
      tableColums: [{
          type: "index",
          width: 60,
          align: "center",
        },
        {
          title: "封面",
          key: "cover",
          width: 85,
          align: "center",
          render: (h, params) =>
            h("img", {
              attrs: {
                //使用缩略图以加快加载速度
                src: this.searchResult[params.index].al.picUrl + "?param=48y48",
              },
            }),
        },
        {
          title: "歌名",
          key: "name",
        },
        {
          title: "歌手",
          key: "artists",
        },
        {
          title: "专辑",
          key: "album",
        },
        {
          title: "播放",
          key: "action",
          width: 100,
          align: "center",
          render: (h, params) =>
            // return `<i-button type="primary" size="small" @click="show(${index})">查看</i-button> <i-button type="error" size="small" @click="remove(${index})">删除</i-button>`;
            h(
              "i-button", {
                props: {
                  type: "primary",
                },
                on: {
                  click: () => {
                    this.navigate(this.searchResult[params.index].id)
                    console.log(params.index)
                  },
                },
              },
              "播放"
            ),
        },
      ],
    }
  }
}